<template>
    <div>
        <header class="customHeaderStyle opac">
			<!--<router-link :to="@click="$route.go(-1);"">-->
				<div class="go-back" @click="$router.go(-1);">
					<i></i>
					<i></i>
					<i></i>
				</div>
			<!--</router-link>-->
			<div class="headerCustomTitle title" v-if="!url">商品网络</div>
			<!--<div class="aui-list-item-label-icon kf">
				<i class="icon njfont nj-kefu"></i>
			</div>-->
			<!-- <m-header title="订单详情"></m-header> -->
		</header>
        <div class="vue_app insert" style="position: absolute;width: 100%; height:100%;">
            <iframe :src="url" frameborder="0" width="100%;" height="100%;" scrolling="no" v-if="url"></iframe>
            <div class="data_img" v-else>
                <img src="static/image/no_news.png" alt="">
                <p>暂无数据</p>
            </div>
        </div>
        
    </div>
	
			
</template>

<script>
    import { findByCode } from '../../api/wxh/getData.js'
	export default {
		data(){
            return {
                url:'',
            }
        },
		async created(){	
            let res = await findByCode();
            console.log(res.data.data[0].goodsSource);
            if(!res.data.data[0].goodsSource || !this.$route.query.traceSource)return;
            this.url = `${res.data.data[0].goodsSource}${this.$route.query.traceSource}`;
		}
	}
</script>
<style scoped>
.customHeaderStyle{
		position: relative;
		background: #fff;
		min-height: 3rem;
		border-bottom: 1px solid #eaeaea;
		color: #444;
		font-weight: 700;
		left: 0;
		top: 0;
		line-height: 2.25rem;
		/* z-index: 2; */
		width: 100%;
		font-size: .9rem;
		text-align: center;
		margin: 0;
		padding: 0;
	}
	.headerCustomTitle{
		overflow: hidden;
		right: 6rem;
		font-weight: 500;
		min-height: 2.25rem;
		position: absolute;
		margin: 0;
		text-align: left;
		white-space: nowrap;
		left: 3rem;
		width: auto;
		text-overflow: ellipsis;
		z-index: 2;
		font-size: 1.1rem;
		margin-top: .35rem;
		top: 1px;
	}
.opac {
    opacity: 0.5;
}
.title {
    text-align: center;
}
.data_img {
    width: 100%;
    height: auto;
    position: absolute;
    top:30%;
    left: 50%;
    transform: translate3d(-50%, -30%, 0);
}
.data_img img {
    margin: auto;
}
</style>